﻿var redis = require('redis')

var redisIp = '127.0.0.1'
var redisPort = '6379'

var redisClient = redis.createClient(redisPort, redisIp)
/*
如果需要验证，还要进行验证  
redisClient.auth('redis20141101123', function(err){
    if(err){
        Log("redisClient auth Error" + err)
        return false
    }
})
*/
// client.select(3, function() { /* ... */ })  
redisClient.select(1)

redisClient.on("error", function (err) {
    Log("redisClient Error" + err)
    return false
})

module.exports = redisClient

